<?php

$criteria=new CDbCriteria;
$criteria->condition='status=1';
$dataProvider=new CActiveDataProvider('Job',array(
    'criteria'=>$criteria,
    'pagination'=>array(
        'pageSize'=>40,
    ),
));

if(isset($_POST['audit'])){
    if(!empty($_POST['audit'])) foreach($_POST['audit'] as $a_k => $a_v){
        $job=Job::model()->findByPk($a_k);
        if(!empty($job)){
            $job->audit=$a_v;
            if($job->save()){
                $this->oz_info('审核状态更新成功');
            }
            return;
        }
    }
}

$session=new CHttpSession();
$session->open();
$session['i']=1;

?>

<div class="detailContent22 wp" style="min-height: 1335px">

        <table width="100%" cellspacing="0" cellpadding="0" border="0" class="table3 paddingbotton80 ">
            <tbody><tr>
                <th width="15%" bgcolor="#efefef" align="center" class="th1">序号</th>
                <th width="30%" bgcolor="#efefef" class="th1">招聘职位</th>
                <th width="16%" bgcolor="#efefef" align="center" class="th1">发布时间</th>
                <th width="20%" bgcolor="#efefef" align="center" class="th1">审核状态</th>
                <th width="18%" bgcolor="#efefef" align="center">操作指令</th>
            </tr>

            <?php
            if(!empty($dataProvider->data))
                $this->widget('zii.widgets.CListView', array(
                    'dataProvider'=>$dataProvider,
                    'itemView'=>'_jobs_sh',
                    'ajaxUpdate'=>false,
                    'template'=>"{items}\n{pager}" ,
    //        'itemsTagName'=>'ul',
    //        'itemsCssClass'=>'tb',
                ));
            ?>
            </tbody>
        </table>
</div>